import UIUtils from "../utils/UIUtils";
import { GeaseType, Gtween, GtweenManager } from "./UIDefine";

//页面默认弹出动画
export const openAni = Laya.Handler.create(null, v => {
    let view = v.view;
    const oldsx = view.scaleX, oldsy = view.scaleY;
    UIUtils.setPivot(view);

    Gtween.kill(view);
    Gtween.to2(0, 0, oldsx, oldsy, 0.3).setEase(GeaseType.BackOut).setTarget(view, (x, y) => {
        view.scaleX = x, view.scaleY = y;
    });

}, null, false);
